<?
if(!MEMBER) common::accessdenied();
if(POST) {
    if($_POST['earlier']){
        $data->postie->conversation = array_reverse(postie::read(array('UID'=>UID,'CID'=>$_POST['CID'],'earlier'=>$_POST['earlier'])));
    } else postie::reply(array('CID'=>$_POST['CID'],'UID'=>UID,'message'=>$_POST['message']));
}
else 
$data->postie->conversation = array_reverse(postie::read(array('UID'=>UID,'CID'=>PARAMS)));
$data->TITLE = $data->postie->conversation[0]->title;
$data->DESCRIPTION = $data->postie->conversation[0]->title;

@include 'apps/advertisement/trunk/_item.php';
$data->CSS = 'advertisement';
?>